﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using Taurus.Platform.DTO;

namespace Taurus.Platform.BLL
{
    class UserHeadImage
    {
        private ImageManager _im;

        public UserHeadImage()
        {
            _im = new ImageManager(@"E:\config\userHead\");
        }

        public Image GetImage(UserAccount ua)
        {
            if (ua.HeadImage!=string.Empty)
            {
                Image head = _im.GetImage(ua.HeadImage);
                if (head == null)
                {
                    head = _im.DownImage(ua.PicFullName);
                }
                return head;
            }
            else
            {
                return global::Taurus.Platform.Properties.Resources.tick;
            }
        }
    }
}
